package com.by.zhdoctor.domain;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * A D_m_zhenghe_user_stat.
 */
@Entity
@Table(name = "d_m_zhenghe_user_stat")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class D_m_zhenghe_user_stat implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @NotNull
    @Column(name = "stati_date", nullable = false)
    private String stati_date;

    @NotNull
    @Column(name = "index_type", nullable = false)
    private String index_type;

    @Column(name = "male_users")
    private Integer male_users;

    @Column(name = "female_users")
    private Integer female_users;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getStati_date() {
        return stati_date;
    }

    public D_m_zhenghe_user_stat stati_date(String stati_date) {
        this.stati_date = stati_date;
        return this;
    }

    public void setStati_date(String stati_date) {
        this.stati_date = stati_date;
    }

    public String getIndex_type() {
        return index_type;
    }

    public D_m_zhenghe_user_stat index_type(String index_type) {
        this.index_type = index_type;
        return this;
    }

    public void setIndex_type(String index_type) {
        this.index_type = index_type;
    }

    public Integer getMale_users() {
        return male_users;
    }

    public D_m_zhenghe_user_stat male_users(Integer male_users) {
        this.male_users = male_users;
        return this;
    }

    public void setMale_users(Integer male_users) {
        this.male_users = male_users;
    }

    public Integer getFemale_users() {
        return female_users;
    }

    public D_m_zhenghe_user_stat female_users(Integer female_users) {
        this.female_users = female_users;
        return this;
    }

    public void setFemale_users(Integer female_users) {
        this.female_users = female_users;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        D_m_zhenghe_user_stat d_m_zhenghe_user_stat = (D_m_zhenghe_user_stat) o;
        if (d_m_zhenghe_user_stat.id == null || id == null) {
            return false;
        }
        return Objects.equals(id, d_m_zhenghe_user_stat.id);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

    @Override
    public String toString() {
        return "D_m_zhenghe_user_stat{" +
            "id=" + id +
            ", stati_date='" + stati_date + "'" +
            ", index_type='" + index_type + "'" +
            ", male_users='" + male_users + "'" +
            ", female_users='" + female_users + "'" +
            '}';
    }
}
